<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style media=print>
.Noprint{display:none;}
</style> 

<style> 
.tabp 
{
border: 1px solid #5BA8DE;
border-collapse:collapse;
padding-top:10px;
} 
.tabp td{
	border: 1px solid #5BA8DE;
	padding-top: 10px;
	padding-bottom: 10px;
}
.NOPRINT { 
font-family: "宋体"; 
font-size: 9pt; 
}
</style>
<title>保单查询</title>
<link href="../style/main.css" rel="stylesheet" type="text/css" />
<link type="text/css" rel="stylesheet" href="../style/style.css" />

<script src="<%=basePath%>/Scripts/jquery-1.3.1.js" type="text/javascript"></script>
<script src="<%=basePath%>/Scripts/jquery-ui-1.8.16.custom.min.js" type="text/javascript"></script>
<script src="<%=basePath%>/Scripts/ui.datepicker-zh_CN.js" type="text/javascript"></script>
<link href="<%=basePath%>/style/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css" />
<script>


function datePicker(pickerName,locale) {
		$(pickerName).datepicker($.datepicker.regional[locale]);
		$(pickerName).datepicker('option', 'changeMonth', true);//月份可调
		$(pickerName).datepicker('option', 'changeYear', true);//年份可调
		
	}
$(document).ready(function(){
datePicker('#insuranceDateStart','zh_CN');
datePicker('#insuranceDateEnd','zh_CN');
});

function assessPrint(){
	document.getElementById("results").focus();
	window.print();
}
</script>



</head>
<body>
<center class="Noprint" >
      <table width="100%"  cellpadding="0" cellspacing="0" class="table2">
        <tr>
          <td valign="top">
            <table width="100%" class="top" cellpadding="0" cellspacing="0">
              <tr>
                <td align="left">当前位置:&nbsp;保单管理&nbsp;&gt;&gt;&nbsp;保单统计</td>
              </tr>
            </table>
			<div id="mainareacontent">
        <div class="mainarea">
        
        <s:form action="policyAction!assessPolicy" method="post" id="assess" theme="simple">
            <div class="search">			
                <table width="100%" cellpadding="0" cellspacing="0">
                    <tr>
                        <td align="left" ><table cellpadding="0" cellspacing="0" border="0" width="100%"  style=" display:block">
                        <tr>
                          <td width="143"> 统计类别： </td>
                          <td width="194" align="left"><s:select list="#{'子公司':'子公司','员工':'员工','险种':'险种'}" name="sortByCN"/></td>
                          <td width="394" align="left"> 投保时间：
                            <s:textfield name="insuranceDateStart" id="insuranceDateStart" cssClass="txt_calendar" cssStyle="width: 60px"><s:param name="value"><s:date name="insuranceDateStart" format="yyyy-MM-dd"/></s:param></s:textfield>
                            至<s:textfield name="insuranceDateEnd" id="insuranceDateEnd" cssClass="txt_calendar" cssStyle="width: 60px"><s:param name="value"><s:date name="insuranceDateEnd" format="yyyy-MM-dd"/></s:param></s:textfield></td>
                          <td width="359" align="left" ><img src="../images/btn_search.gif" onclick="document.getElementById('assess').submit();" width="42px" height="22px"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" style="width:40px; height:20px; font-size:12px; background-color: #F1F6FF;" onclick="assessPrint()" value="打 印"/></td>
                        </tr>                        
                      </table>
                      </td>
                    </tr>
                </table>
            </div>

             
        </s:form>
            
        </div>
      </div></td>
        </tr>
      </table>
</center>
<br/>
      <table width="800" align="center" class="tabp" id="results">
	  <caption style="height:30px;font-size:14px">统计结果</caption>
                <tr align="center">
                  <td width="323"><s:property value="sortByCN"/>编号</td>
                  <td width="323"><s:property value="sortByCN"/>名称</td>
                  <td width="332">投保总数</td>
                  <td width="435">保险总额</td>
                </tr>
              <s:set name="sum" value="0"/>
               <s:set name="sumFee" value="0"/>
              <s:iterator value="assessList" status="s">
                <tr align="center" >
                  <td><s:property value="assessList[#s.index][0]"/></td>
                  <td><s:property value="assessList[#s.index][1]"/></td>
                  <td><s:property value="assessList[#s.index][2]"/></td>
                  <td><s:property value="assessList[#s.index][3]"/></td>
                  <s:set name="sum" value="#sum+assessList[#s.index][2]"/>
                   <s:set name="sumFee" value="#sumFee+assessList[#s.index][3]"/>
                </tr>
                </s:iterator>
                <tr align="center" >
                  <td>总计</td>
                  <td>-</td>
                  <td><s:property value="#sum"/></td>
                  <td><s:property value="#sumFee"/></td>
                </tr>
</table>

</body>
</html>